\(\int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx\) [344]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 30, antiderivative size = 51 \[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {3 \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]

[Out]

-a*cos(f*x+e)*ln(1-sin(f*x+e))/f/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2)

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.02, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2816, 2746, 31} \[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {a \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \]

[In]

Int[Sqrt[a + a*Sin[e + f*x]]/Sqrt[c - c*Sin[e + f*x]],x]

[Out]

-((a*Cos[e + f*x]*Log[1 - Sin[e + f*x]])/(f*Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]]))

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 2816

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[a
*c*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]])), Int[Cos[e + f*x]/(c + d*Sin[e + f*x]),
x], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(a c \cos (e+f x)) \int \frac {\cos (e+f x)}{c-c \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = -\frac {(a \cos (e+f x)) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,-c \sin (e+f x)\right )}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = -\frac {a \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.03 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.29 \[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {\sqrt {6} \left (-i+e^{i (e+f x)}\right ) \left (f x+2 i \log \left (i-e^{i (e+f x)}\right )\right ) \sqrt {1+\sin (e+f x)}}{\sqrt {i c e^{-i (e+f x)} \left (-i+e^{i (e+f x)}\right )^2} \left (i+e^{i (e+f x)}\right ) f} \]

[In]

Integrate[Sqrt[3 + 3*Sin[e + f*x]]/Sqrt[c - c*Sin[e + f*x]],x]

[Out]

-((Sqrt[6]*(-I + E^(I*(e + f*x)))*(f*x + (2*I)*Log[I - E^(I*(e + f*x))])*Sqrt[1 + Sin[e + f*x]])/(Sqrt[(I*c*(-
I + E^(I*(e + f*x)))^2)/E^(I*(e + f*x))]*(I + E^(I*(e + f*x)))*f))

Maple [A] (verified)

Time = 2.20 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.88

method result size
default \(-\frac {\sqrt {a \left (\sin \left (f x +e \right )+1\right )}\, \left (\ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )-2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1\right )\right ) \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right )}{f \left (1+\cos \left (f x +e \right )+\sin \left (f x +e \right )\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}\) \(96\)

[In]

int((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/f*(a*(sin(f*x+e)+1))^(1/2)*(ln(2/(cos(f*x+e)+1))-2*ln(-cot(f*x+e)+csc(f*x+e)-1))*(-cos(f*x+e)+sin(f*x+e)-1)
/(1+cos(f*x+e)+sin(f*x+e))/(-c*(sin(f*x+e)-1))^(1/2)

Fricas [F]

\[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=\int { \frac {\sqrt {a \sin \left (f x + e\right ) + a}}{\sqrt {-c \sin \left (f x + e\right ) + c}} \,d x } \]

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

integral(-sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)/(c*sin(f*x + e) - c), x)

Sympy [F]

\[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}{\sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )}}\, dx \]

[In]

integrate((a+a*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(a*(sin(e + f*x) + 1))/sqrt(-c*(sin(e + f*x) - 1)), x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.24 \[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {\frac {2 \, \sqrt {a} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{\sqrt {c}} - \frac {\sqrt {a} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {c}}}{f} \]

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

(2*sqrt(a)*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/sqrt(c) - sqrt(a)*log(sin(f*x + e)^2/(cos(f*x + e) + 1)^2
+ 1)/sqrt(c))/f

Giac [A] (verification not implemented)

none

Time = 0.44 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.04 \[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {2 \, \sqrt {a} \log \left ({\left | \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\sqrt {c} f \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} \]

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

2*sqrt(a)*log(abs(sin(-1/4*pi + 1/2*f*x + 1/2*e)))*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))/(sqrt(c)*f*sgn(sin(-1/4
*pi + 1/2*f*x + 1/2*e)))

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {3+3 \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {\sqrt {a+a\,\sin \left (e+f\,x\right )}}{\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \]

[In]

int((a + a*sin(e + f*x))^(1/2)/(c - c*sin(e + f*x))^(1/2),x)

[Out]

int((a + a*sin(e + f*x))^(1/2)/(c - c*sin(e + f*x))^(1/2), x)